export default {
    'GET /mock/oauth/.well-known/openid-configuration': {
        issuer: '/mock/oauth/',
        authorization_endpoint: '/mock/oauth/oauth2/authorize',
        token_endpoint: '/mock/oauth/oauth2/token',
        token_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post'],
        jwks_uri: '/mock/oauth/oauth2/jwks',
        response_types_supported: ['code'],
        grant_types_supported: ['authorization_code', 'client_credentials', 'refresh_token'],
        subject_types_supported: ['public'],
        id_token_signing_alg_values_supported: ['RS256'],
        scopes_supported: ['openid']
    },
    'GET /mock/oauth/oauth2/authorize': (req: any, res: any) => {
        res.redirect(302, req.param('redirect_uri') + '&state=' + req.param('state') + '&code=test');
    },
    'POST /mock/oauth/oauth2/token': {
        id_token: {
            id: 'test',
            name: '测试用户',
            authorities: [
                {authority: '组织管理员'},
                {authority: '用户管理员'}
            ]
        }
    },
};
